package com.gitee.wsl.mathematics.geometry.shape

import androidx.compose.ui.geometry.Rect
import androidx.compose.ui.geometry.Size

open class Oval(
    val startAngle: Float = 0f,
    val sweepAngle: Float = 360f,
    var position: Point,
    var size: Size = Size.Zero
) {
    val rect: Rect get() = position + size
}

internal operator fun Point.plus(size: Size) = Rect(x-size.width/2,
    y-size.height/2,
    x+size.width/2,
    y+size.height/2
)